#ifndef __RENDERLISTBASE__
#define __RENDERLISTBASE__

#include "..\Math\Colorb.h"
#include "..\Math\Point3.h"
#include "..\Math\Matrix4.h"
#include "Face.h"
#include "..\Math\MathHelper.h"

#include <cstdint>
#include <stack>
#include <vector>
#include <wx\thread.h>
#include <wx\filename.h>

struct RenderVertex
{
	Point3f Point;
	Point2f TexCoord;
	float Color[4];
};

struct RenderBox
{
	bool Full, Opaque;
	Face Faces[6];
	Point3i Position;
};

class RenderListBase
{
public:
	ITexture *Texture;
	std::vector<Face> Faces;
	std::vector<RenderBox> Boxes;
	bool Loaded;

	size_t CompiledSize;
	std::vector<RenderVertex> CompiledVertices;
	
	RenderListBase() :
		Texture(nullptr),
		Loaded(false)
	{
	}

	virtual ~RenderListBase() { }

	inline void Unload()
	{
		std::vector<Face>().swap(Faces);
		std::vector<RenderBox>().swap(Boxes);
	}
};

#endif